import React, { ReactNode } from 'react';
import { Row, Typography, Col, Space } from 'antd';
import './TitleHeader.less';

const { Title } = Typography

interface IProps {
    title: string
    children?: ReactNode
}

const TitleHeader = (props: IProps) => {
    return (
        <Row className='title-header' justify='space-between' align='middle'>
            <Title level={5} style={{ marginBottom: 10 }}>{props.title}</Title>
            <Col>
                <Space>
                    {
                        props.children ? props.children : null
                    }
                </Space>
            </Col>
        </Row>
    )
}

export default TitleHeader
